package Class;

import Class.MandreelElement.MandreelBase;
import Class.MandreelElement.MandreelCanvas;
import Class.MandreelElement.MandreelCanvasDiv;
import Class.MandreelElement.MandreelElement;

public class MandreelDocument {
    public boolean fullScreenEnabled = true;
    public String movieName = "";

    public MandreelElement createElement(String elementType) {
        MandreelElement element = new MandreelElement();
        element.parentNode = (new MandreelElement());
        return element;
    }

    public MandreelBase getElementById(String name) {
        if ("canvas".equals(name)) {
            return new MandreelCanvas();
        } else if ("canvasDiv".equals(name)) {
            return new MandreelCanvasDiv();
        } else {
            return null;
        }
    }

    public MandreelElement[] getElementsByTagName(String element) {
        if ("script".equals(element)) {
            return new MandreelElement[]{this.createElement(element)};
        } else {
            return new MandreelElement[]{};
        }
    }

    public static MandreelDocument mandreelDocument = new MandreelDocument();
}
